﻿

#include <stdio.h>
#include <stdlib.h>
typedef struct student
{
	char* name;
	int age;
	float score;
}student;
int main()
{
	student s;//无需手动分配内存
	student* s1 = (student*)malloc(sizeof(student));//内存需要手动分配
	s1->name = (char*)malloc(20 * sizeof(char));//分配内存
	free(s1->name);//释放内存
	free(s1);//释放内存
	s1 = NULL;
}


